package com.mrd.gtimpframe.entity;

import com.mrd.util.LoginUtil;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * T_GEN_COM_AGENT_REF
 *
 * @author dusy  2017-12-20
 * 委托关系
 */
public class AgentRef implements Serializable {
    /**
     * null
     */
    private String agentRefId;

    /**
     * 代录单人ID
     */
    private String agentComId;

    /**
     * 隐性客户ID
     */
    private String recessiveComId;

    /**
     * 状态
     */
    private String status;

    /**
     * 删除标识 1 删除 0 未删除
     */
    private String delFlag;

    /**
     * null
     */
    private Date ctime;

    /**
     * null
     */
    private String creator;

    /**
     * null
     */
    private Date mtime;

    /**
     * null
     */
    private String modifier;

    private CompanyInfo recessiveCompanyInfo;

    private String auditStatus;

    /**
     * T_GEN_COM_AGENT_REF
     */
    private static final long serialVersionUID = 1L;

    public String getAgentRefId() {
        return agentRefId;
    }

    public void setAgentRefId(String agentRefId) {
        this.agentRefId = agentRefId == null ? null : agentRefId.trim();
    }

    public String getAgentComId() {
        return agentComId;
    }

    public void setAgentComId(String agentComId) {
        this.agentComId = agentComId == null ? null : agentComId.trim();
    }

    public String getRecessiveComId() {
        return recessiveComId;
    }

    public void setRecessiveComId(String recessiveComId) {
        this.recessiveComId = recessiveComId == null ? null : recessiveComId.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag == null ? null : delFlag.trim();
    }

    public Date getCtime() {
        return ctime;
    }

    public void setCtime(Date ctime) {
        this.ctime = ctime;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator == null ? null : creator.trim();
    }

    public Date getMtime() {
        return mtime;
    }

    public void setMtime(Date mtime) {
        this.mtime = mtime;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier == null ? null : modifier.trim();
    }

    public AgentRef() {
    }

    public AgentRef(String agentComId, String recessiveComId) {
        this.agentRefId = UUID.randomUUID().toString().replace("-", "");
        this.agentComId = agentComId;
        this.recessiveComId = recessiveComId;
        this.creator = LoginUtil.getLoginUserId();
        this.ctime = new Date();
        this.delFlag = "0";
    }

    public CompanyInfo getRecessiveCompanyInfo() {
        return recessiveCompanyInfo;
    }

    public void setRecessiveCompanyInfo(CompanyInfo recessiveCompanyInfo) {
        this.recessiveCompanyInfo = recessiveCompanyInfo;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }
}